Some text for introduction to this survey and results.
Student survey has been conducted for 2 weeks and received 51 total reponses.
Load all required libraries that will be used throughout this analysis.
library(plyr)
library(psych)
library(plotly)
library(summarytools)
st_options(plain.ascii = FALSE, style = "rmarkdown", dfSummary.varnumbers = FALSE, dfSummary.valid.col = FALSE)
Start reading both CSV files, from student survey and speedtest result.
csv_surv <- read.csv('Student_Survey.csv')
csv_test <- read.csv('Speedtest_Result.csv')
Rename variables name to something more meaningful, shorter and easier to code.
tmpstud <-
plyr::rename(
csv_surv,
c(
Academic.Programme = "Programme",
Internet.Connection.Method = "SSID",
Main.Usage.of.Internet = "Usage",
On.overall.basis..how.satisfied.are.you.with.wireless.internet.connection.provided.by.IIUM. = "Satisfaction",
Propose.a.solution.to.improve.IIUM.WIFI.services. = "Comment",
Average.Duration.of.Daily.Use.of.Internet = "Duration",
How.many.times.have.your.Internet.connection.been.suddenly.disconnected.or.face.intermittent.connection.in.past.3.days. = "Disconnected",
Is.WiFi.coverage.adequate.and.within.acceptable.signal.strength. = "Coverage",
How.satisfied.are.you.with.the.network.speed.to.achieve.your.main.usages. = "Speed"
)
)
tmptest <-
plyr::rename(
csv_test,
c(
Mahallah.Dept = "Mahallah",
Download.Mbps = "Download",
Upload.Mbps = "Upload",
Ping.ms = "Ping",
Jitter.ms = "Jitter",
Loss.. = "Loss"
)
)
Perform data cleansing
tmpstud <- tmpstud[which(tmpstud$Gender == ''),]
tmpstud$Timestamp <- tmpstud$Gender <- tmpstud$Comment <- NULL
tmpstud$Usage[7] <-
"Study and assignment, Topic and subject research, Casual browsing"
tmpstud$Usage <- strsplit(as.character(tmpstud$Usage), ",")
tmpstud$Satisfaction <-
ifelse(
tmpstud$Satisfaction == 1,
"Very Dissatisfied",
ifelse(
tmpstud$Satisfaction == 2,
"Dissatisfied",
ifelse(tmpstud$Satisfaction == 3, "Satisfied", "Very Satisfied")
)
)
tmpstud$Speed <-
ifelse(
tmpstud$Speed == 1,
"Very Dissatisfied",
ifelse(
tmpstud$Speed == 2,
"Dissatisfied",
ifelse(tmpstud$Speed == 3, "Satisfied", "Very Satisfied")
)
)
tmptest$Loss <- 0
Split Usage into list and transpose into dataframe
k <- 1
Respondent <- character()
Programme <- character()
SSID <- character()
Mahallah <- character()
Usage <- character()
Satisfaction <- character()
Duration <- character()
Speed <- character()
Disconnected <- character()
Coverage <- character()
# iterate each row to split Usage into separate line in data frame
for (i in 1:nrow(tmpstud))
{
for (j in 1:3)
{
Respondent[k] <- i # to identify unique number of respondent
Programme[k] <- as.character(tmpstud$Programme[i])
SSID[k] <- as.character(tmpstud$SSID[i])
Mahallah[k] <- as.character(tmpstud$Mahallah[i])
Usage[k] <-
trimws(tmpstud$Usage[[i]][j]) # trim leading and trailing whitespace
Satisfaction[k] <- as.character(tmpstud$Satisfaction[i])
Duration[k] <- as.character(tmpstud$Duration[i])
Speed[k] <- as.character(tmpstud$Speed[i])
Disconnected[k] <- as.character(tmpstud$Disconnected[i])
Coverage[k] <- as.character(tmpstud$Coverage[i])
k <- k + 1
}
}
Finalized dataframe from previous step
dfstudentB <-
data.frame(
Respondent,
Programme,
SSID,
Mahallah,
Usage,
Satisfaction,
Duration,
Speed,
Disconnected,
Coverage,
stringsAsFactors = TRUE
)
dfstudentA <-
unique(dfstudentB[,-5]) # minus Usage and retrieve only unique records
dftest <- tmptest
dfSummary(
dfstudentA[,-1],
max.distinct.values = 15,
plain.ascii = FALSE,
style = "grid",
graph.magnif = 0.75,
valid.col = FALSE,
tmp.img.dir = "./img",
na.col = FALSE
)
Dimensions: 50 x 8
Duplicates: 1
| Variable | Stats / Values | Freqs (% of Valid) | Graph |
|---|---|---|---|
Programme |
1. Alumni (<= 2 Years) |
9 (18.0%) |
|
SSID |
1. WiFi - Guest |
1 ( 2.0%) |
|
Mahallah |
1. Ali |
2 ( 4.0%) |
|
Satisfaction |
1. Dissatisfied |
20 (40.0%) |
|
Duration |
1. 1 - 4 hours |
7 (14.0%) |
|
Speed |
1. Dissatisfied |
22 (44.0%) |
|
Disconnected |
1. 1 - 5 times |
18 (36.0%) |
|
Coverage |
1. No |
33 (66.0%) |
dfusage <- count(dfstudentB$Usage)
plot_ly(
dfusage,
labels = dfusage$x,
values = ~ dfusage$freq,
type = 'pie'
) %>%
layout(
title = 'Primary Usage of Internet',
xaxis = list(
showgrid = FALSE,
zeroline = FALSE,
showticklabels = FALSE
),
yaxis = list(
showgrid = FALSE,
zeroline = FALSE,
showticklabels = FALSE
)
)
preserve167caf9e13f6d07d